import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

// 引入路由组件
// 初始首页
const Home = resolve => require(['../views/home/index.vue'], resolve)
// ***************************************************************************

const routes = [
  // 首页
  {
    path: '/',
    name: 'home',
    component: Home
  },
  // 系统管理/用户管理
  {
    path: '/system/admin',
    component: () => import('../views/system/admin.vue'),
  },
   // 系统管理/角色管理
   {
    path: '/system/role',
    component: () => import('../views/system/role.vue'),
  },
   // 系统管理/权限管理
   {
    path: '/system/permissions',
    component: () => import('../views/system/permissions.vue'),
  },
   // 系统管理/菜单管理
   {
    path: '/system/order',
    component: () => import('../views/system/order.vue'),
  },


  // 列表页/查询表格
  {
    path: '/list/select',
    component: () => import('../views/list/select.vue'),
  },
  // 列表页/标准列表
  {
    path: '/list/standard',
    component: () => import('../views/list/standard.vue'),
  },

  // 表单页/基础表单
  {
    path: '/form/basis',
    component: () => import('../views/form/basis.vue'),
  },
  // 表单页/分步表单
  {
    path: '/form/stepByStep',
    component: () => import('../views/form/stepByStep.vue'),
  },
  // 表单页/高级表单
  {
    path: '/form/senior',
    component: () => import('../views/form/senior.vue'),
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router